package com.ihr360.insurance.service;

import com.ihr360.commons.vo.PageData;
import com.ihr360.excel.entity.ExportParams;
import com.ihr360.insurance.entity.request.MemberPlanReq;
import com.ihr360.insurance.entity.response.LedgerResponse;
import com.ihr360.insurance.entity.vo.MemberPlanVo;
import com.ihr360.insurance.model.dto.ledger.DecreaseMemberPlan;
import com.ihr360.rest.service.SimpleRestService;

import java.util.List;

/**
 * @author Stone.Shi
 * @description
 * @date 2018-02-01 18:25:24.
 */
public interface DecreaseMemberService extends SimpleRestService<DecreaseMemberPlan, Long> {

    /**
     * 获取增员人员
     *
     * @param companyId
     * @param userId
     * @param req
     * @param authStaffIds
     * @return
     */
    PageData<MemberPlanVo> getDecreaseMember(String companyId, String userId,
                                             MemberPlanReq req, List<String> authStaffIds);

    /**
     * 将减员员工添加到相应台账中
     *
     * @param companyId
     * @param userId
     * @param ledgerYear
     * @param ledgerMonth
     * @param memberPlanVo
     * @return
     */
    LedgerResponse addDecreaseStaffToLedger(String companyId, String userId,
                                            Integer ledgerYear, Integer ledgerMonth,
                                            MemberPlanVo memberPlanVo);

    /**
     * 将减员员工添加到相应台账中
     *
     * @param companyId
     * @param userId
     * @param ledgerYear
     * @param ledgerMonth
     * @param memberPlanVo
     * @return
     */
    boolean deleteDecreaseStaffFromLedger(String companyId, String userId,
                                          Integer ledgerYear, Integer ledgerMonth,
                                          MemberPlanVo memberPlanVo);

    /**
     * 关闭台账之后，保存当月的减员记录
     *
     * @param ledgerSummaryId
     * @param authStaffIds
     */
    void saveDecreaseMemberRecords(Long ledgerSummaryId, List<String> authStaffIds);

    /**
     * 删除当月的减员记录
     *
     * @param companyId
     * @param userId
     * @param ledgerYear
     * @param ledgerMonth
     */
    void deleteDecreaseMemberRecords(String companyId, String userId, Integer ledgerYear, Integer ledgerMonth);

    /**
     *  获取导出的减员表数据
     * @param companyId
     * @param userId
     * @param req
     * @param authStaffIds
     * @return
     */
    ExportParams<List<Object>> getExportExcelData(String companyId, String userId, MemberPlanReq req, List<String> authStaffIds);

}
